let tds=document.getElementsByTagName('td')
for (let i = 0; i < tds.length; i++) {
    tds[i].addEventListener('click',function (){
        this.style.backgroundColor='black'
    })
}